package cate.game.role.farm.adventure.msg;

import cate.common.annotation.OperationSetter;
import cate.common.table.d.GDOperation;
import cate.common.util.GameResult;
import cate.game.GameBody;
import cate.game.client.ClientContext;
import cate.game.client.msg.ClientMsg;
import cate.game.client.msg.MsgConfig;
import cate.game.client.msg.MsgInput;
import cate.game.client.msg.id.MsgIdBAdventure;

@ClientMsg(title = "主线挑战 の 请求")
@OperationSetter(GDOperation.ADVENTURE_CHALLENGE)
public class AdventureChallengeReq implements MsgInput {
    @Override
    public void execute(GameBody game, ClientContext cc) {
        GameResult r = cc.getRole().getFarm().adventure.challenge();
        cc.getRole().getGame().notice.message(cc.getRole(), r, true);
    }

    @Override
    public MsgConfig conf() {
        return MsgIdBAdventure.ADVENTURE_CHALLENGE_REQ;
    }
}
